<?php
$array_message=Common::get_message();
if($array_message==null)
	return;
$message_type=$array_message['message_type'];
$message=$array_message['message'];
?>
<div id='message'>
<?php
switch($message_type)
{
	case Config::$MESSAGE_TYPE_INFO:
?>
	<div class="ui-widget" id='info'>
		<div class="ui-state-hover ui-corner-all" style="padding: 0 .7em;">
			<p title="<?php echo $message;?>">
				<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
				<strong>Thông báo:</strong> <?php echo $message;?>
			</p>
		</div>
	</div>
<?php
		break;
	case Config::$MESSAGE_TYPE_ERROR:
?>
	<div class="ui-widget" id='error'>
		<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
			<p title="<?php echo $message;?>">
				<span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
				<strong>Báo lỗi:</strong> <?php echo $message;?>
			</p>
		</div>
	</div>
<?php
		break;
}
?>
	<li class="ico ui-state-default ui-corner-all" id='close-message' title='Tắt thông báo'> 
		<span class="ui-icon ui-icon-closethick"></span>
	</li>
</div>